package com.example.vo.per;

import com.example.util.DateUtils;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.sql.Time;
import java.util.Date;
import java.util.List;

/**
 * 考勤日期参数
 *
 * @author pursueSong
 * 2022-05-11
 */
@Data
public class ClockInParams {

    @ApiModelProperty("员工编号")
    private Integer workId;

    @ApiModelProperty("班次编号")
    private Integer shiftId;

    @ApiModelProperty("开始日期")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "Asia/Shanghai")
    private Date initiateDate;

    @ApiModelProperty("结束日期")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "Asia/Shanghai")
    private Date closureDate;

    @ApiModelProperty("签到提前打卡时间")
    @JsonFormat(pattern = "HH:mm:ss",timezone = "Asia/Shanghai")
    private Time checkInAdvance;

    @ApiModelProperty("签到推迟打卡时间")
    @JsonFormat(pattern = "HH:mm:ss",timezone = "Asia/Shanghai")
    private Time checkDelayAdvance;

    @ApiModelProperty("签退提前打卡时间")
    @JsonFormat(pattern = "HH:mm:ss",timezone = "Asia/Shanghai")
    private Time signOutInAdvance;

    @ApiModelProperty("签退推迟打卡时间")
    @JsonFormat(pattern = "HH:mm:ss",timezone = "Asia/Shanghai")
    private Time signOutDelayAdvance;


    private List<String> rangeDays;

    public List<String> getRangeDays() {
        return DateUtils.getTimeRangeDay(this.initiateDate, this.closureDate);
    }

    
}
